<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>gui_x11 - Vim Documentation</title>
<meta name="Generator" content="Vim/8.0">
<meta name="plugin-version" content="vim8.0">
<meta name="syntax" content="help">
<meta name="settings" content="no_pre,use_css,expand_tabs">
<link rel="stylesheet" href="style.css" type="text/css" />

<script src="jquery.min.js" type="text/javascript"></script>
<script src="mark-current-page.js" type="text/javascript"></script>
</head>

<body>

<header>

<div class="header">
  <a href="http://vim-jp.org/">vim-jp</a>
  / <a href="http://vim-jp.org/vimdoc-en/">vimdoc-en</a>
  / gui_x11<br />
  <a name="top"></a><h1>gui_x11 - Vim Documentation</h1>
  <a href="index.html">Return to main</a>

  <span class="EnglishJapaneseLink">
    <span class="CurrentLanguage">English</span>
  </span>
</div>
</header>

<nav>
<dl>

<dt>BASIC</dt>
<dd><ul>
<li><a href="quickref.html">quickref</a></li>
<li><a href="sponsor.html">sponsor</a></li>
</ul></dd>

<dt>USER MANUAL</dt>
<dd><ul>
<li><a href="usr_toc.html">usr_toc</a></li>
</ul></dd>

<dt>Getting Started</dt>
<dd><ul>
<li><a href="usr_01.html">usr_01</a></li>
<li><a href="usr_02.html">usr_02</a></li>
<li><a href="usr_03.html">usr_03</a></li>
<li><a href="usr_04.html">usr_04</a></li>
<li><a href="usr_05.html">usr_05</a></li>
<li><a href="usr_06.html">usr_06</a></li>
<li><a href="usr_07.html">usr_07</a></li>
<li><a href="usr_08.html">usr_08</a></li>
<li><a href="usr_09.html">usr_09</a></li>
<li><a href="usr_10.html">usr_10</a></li>
<li><a href="usr_11.html">usr_11</a></li>
<li><a href="usr_12.html">usr_12</a></li>
</ul></dd>

<dt>Editing Effectively</dt>
<dd><ul>
<li><a href="usr_20.html">usr_20</a></li>
<li><a href="usr_21.html">usr_21</a></li>
<li><a href="usr_22.html">usr_22</a></li>
<li><a href="usr_23.html">usr_23</a></li>
<li><a href="usr_24.html">usr_24</a></li>
<li><a href="usr_25.html">usr_25</a></li>
<li><a href="usr_26.html">usr_26</a></li>
<li><a href="usr_27.html">usr_27</a></li>
<li><a href="usr_28.html">usr_28</a></li>
<li><a href="usr_29.html">usr_29</a></li>
<li><a href="usr_30.html">usr_30</a></li>
<li><a href="usr_31.html">usr_31</a></li>
<li><a href="usr_32.html">usr_32</a></li>
</ul></dd>

<dt>Tuning Vim</dt>
<dd><ul>
<li><a href="usr_40.html">usr_40</a></li>
<li><a href="usr_41.html">usr_41</a></li>
<li><a href="usr_42.html">usr_42</a></li>
<li><a href="usr_43.html">usr_43</a></li>
<li><a href="usr_44.html">usr_44</a></li>
<li><a href="usr_45.html">usr_45</a></li>
</ul></dd>

<dt>Making Vim Run</dt>
<dd><ul>
<li><a href="usr_90.html">usr_90</a></li>
</ul></dd>

<dt>General subjects</dt>
<dd><ul>
<li><a href="intro.html">intro</a></li>
<li><a href="index.html">help</a></li>
<li><a href="helphelp.html">helphelp</a></li>
<li><a href="vimindex.html">index</a></li>
<li><a href="tags.html">tags</a></li>
<li><a href="howto.html">howto</a></li>
<li><a href="tips.html">tips</a></li>
<li><a href="message.html">message</a></li>
<li><a href="quotes.html">quotes</a></li>
<li><a href="todo.html">todo</a></li>
<li><a href="debug.html">debug</a></li>
<li><a href="develop.html">develop</a></li>
<li><a href="uganda.html">uganda</a></li>
</ul></dd>

<dt>Basic editing</dt>
<dd><ul>
<li><a href="starting.html">starting</a></li>
<li><a href="editing.html">editing</a></li>
<li><a href="motion.html">motion</a></li>
<li><a href="scroll.html">scroll</a></li>
<li><a href="insert.html">insert</a></li>
<li><a href="change.html">change</a></li>
<li><a href="indent.html">indent</a></li>
<li><a href="undo.html">undo</a></li>
<li><a href="repeat.html">repeat</a></li>
<li><a href="visual.html">visual</a></li>
<li><a href="various.html">various</a></li>
<li><a href="recover.html">recover</a></li>
</ul></dd>

<dt>Advanced editing</dt>
<dd><ul>
<li><a href="cmdline.html">cmdline</a></li>
<li><a href="options.html">options</a></li>
<li><a href="pattern.html">pattern</a></li>
<li><a href="map.html">map</a></li>
<li><a href="tagsrch.html">tagsrch</a></li>
<li><a href="quickfix.html">quickfix</a></li>
<li><a href="windows.html">windows</a></li>
<li><a href="tabpage.html">tabpage</a></li>
<li><a href="syntax.html">syntax</a></li>
<li><a href="spell.html">spell</a></li>
<li><a href="diff.html">diff</a></li>
<li><a href="autocmd.html">autocmd</a></li>
<li><a href="filetype.html">filetype</a></li>
<li><a href="eval.html">eval</a></li>
<li><a href="channel.html">channel</a></li>
<li><a href="fold.html">fold</a></li>
</ul></dd>

<dt>Special issues</dt>
<dd><ul>
<li><a href="print.html">print</a></li>
<li><a href="remote.html">remote</a></li>
<li><a href="term.html">term</a></li>
<li><a href="digraph.html">digraph</a></li>
<li><a href="mbyte.html">mbyte</a></li>
<li><a href="mlang.html">mlang</a></li>
<li><a href="arabic.html">arabic</a></li>
<li><a href="farsi.html">farsi</a></li>
<li><a href="hebrew.html">hebrew</a></li>
<li><a href="russian.html">russian</a></li>
<li><a href="ft_ada.html">ft_ada</a></li>
<li><a href="ft_sql.html">ft_sql</a></li>
<li><a href="hangulin.html">hangulin</a></li>
<li><a href="rileft.html">rileft</a></li>
</ul></dd>

<dt>GUI</dt>
<dd><ul>
<li><a href="gui.html">gui</a></li>
<li><a href="gui_w32.html">gui_w32</a></li>
<li><a href="gui_x11.html">gui_x11</a></li>
</ul></dd>

<dt>Interfaces</dt>
<dd><ul>
<li><a href="if_cscop.html">if_cscop</a></li>
<li><a href="if_lua.html">if_lua</a></li>
<li><a href="if_mzsch.html">if_mzsch</a></li>
<li><a href="if_perl.html">if_perl</a></li>
<li><a href="if_pyth.html">if_pyth</a></li>
<li><a href="if_tcl.html">if_tcl</a></li>
<li><a href="if_ole.html">if_ole</a></li>
<li><a href="if_ruby.html">if_ruby</a></li>
<li><a href="debugger.html">debugger</a></li>
<li><a href="workshop.html">workshop</a></li>
<li><a href="netbeans.html">netbeans</a></li>
<li><a href="sign.html">sign</a></li>
</ul></dd>

<dt>Versions</dt>
<dd><ul>
<li><a href="vi_diff.html">vi_diff</a></li>
<li><a href="version4.html">version4</a></li>
<li><a href="version5.html">version5</a></li>
<li><a href="version6.html">version6</a></li>
<li><a href="version7.html">version7</a></li>
<li><a href="version8.html">version8</a></li>
</ul></dd>

<dt>Remarks about specific systems</dt>
<dd><ul>
<li><a href="os_390.html">os_390</a></li>
<li><a href="os_amiga.html">os_amiga</a></li>
<li><a href="os_beos.html">os_beos</a></li>
<li><a href="os_dos.html">os_dos</a></li>
<li><a href="os_mac.html">os_mac</a></li>
<li><a href="os_mint.html">os_mint</a></li>
<li><a href="os_msdos.html">os_msdos</a></li>
<li><a href="os_os2.html">os_os2</a></li>
<li><a href="os_qnx.html">os_qnx</a></li>
<li><a href="os_risc.html">os_risc</a></li>
<li><a href="os_unix.html">os_unix</a></li>
<li><a href="os_vms.html">os_vms</a></li>
<li><a href="os_win32.html">os_win32</a></li>
</ul></dd>

<dt>Standard plugins</dt>
<dd><ul>
<li><a href="pi_getscript.html">pi_getscript</a></li>
<li><a href="pi_gzip.html">pi_gzip</a></li>
<li><a href="pi_logipat.html">pi_logipat</a></li>
<li><a href="pi_netrw.html">pi_netrw</a></li>
<li><a href="pi_paren.html">pi_paren</a></li>
<li><a href="pi_tar.html">pi_tar</a></li>
<li><a href="pi_vimball.html">pi_vimball</a></li>
<li><a href="pi_zip.html">pi_zip</a></li>
</ul></dd>

<dt>Filetype plugins</dt>
<dd><ul>
<li><a href="pi_spec.html">pi_spec</a></li>
</ul></dd>

<dt>Others</dt>
<dd><ul>
<li><a href="vim_faq.html">vim_faq</a></li>
</ul></dd>

</dl>
</nav>

<article class="Vimdoc VimdocJa">
<div id='vimCodeElement'>
<a class="Constant" href="gui_x11.html" name="gui_x11.txt">gui_x11.txt</a>&nbsp;&nbsp; For&nbsp;<span class="Identifier">Vim version 8.0.</span>&nbsp;&nbsp;Last change: 2017 Jul 28<br>
<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Identifier">VIM REFERENCE MANUAL&nbsp;&nbsp;&nbsp;&nbsp;by Bram Moolenaar</span><br>
<br>
<br>
Vim's Graphical User Interface&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11" name="gui-x11">gui-x11</a>&nbsp;<a class="Constant" href="gui_x11.html#GUI-X11" name="GUI-X11">GUI-X11</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#Athena" name="Athena">Athena</a>&nbsp;<a class="Constant" href="gui_x11.html#Motif" name="Motif">Motif</a><br>
1. Starting the X11 GUI&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui_x11.html#gui-x11-start">gui-x11-start</a><br>
2. GUI Resources&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui_x11.html#gui-resources">gui-resources</a><br>
3. Shell Commands&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui_x11.html#gui-pty">gui-pty</a><br>
4. Various&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui_x11.html#gui-x11-various">gui-x11-various</a><br>
5. GTK version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui_x11.html#gui-gtk">gui-gtk</a><br>
6. GNOME version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui_x11.html#gui-gnome">gui-gnome</a><br>
7. KDE version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui_x11.html#gui-kde">gui-kde</a><br>
8. Compiling&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui_x11.html#gui-x11-compiling">gui-x11-compiling</a><br>
9. X11 selection mechanism&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Identifier" href="gui_x11.html#x11-selection">x11-selection</a><br>
<br>
Other relevant documentation:<br>
<a class="Identifier" href="gui.html">gui.txt</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For generic items of the GUI.<br>
<br>
<span class="Special">{Vi does not have any of these commands}</span><br>
<br>
<span class="PreProc">==============================================================================</span><br>
1. Starting the X11 GUI&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11-start" name="gui-x11-start">gui-x11-start</a>&nbsp;<a class="Constant" href="gui_x11.html#E665" name="E665">E665</a><br>
<br>
Then you can run the GUI version of Vim in either of these ways:<br>
&nbsp;&nbsp;&nbsp;&nbsp;gvim&nbsp;<span class="Special">[options]</span>&nbsp;[files...]<br>
&nbsp;&nbsp;&nbsp;&nbsp;vim -g&nbsp;<span class="Special">[options]</span>&nbsp;[files...]<br>
<br>
So if you call the executable &quot;gvim&quot;, or make &quot;gvim&quot; a link to the executable,<br>
then the GUI version will automatically be used.&nbsp;&nbsp;Additional characters may be<br>
added after &quot;gvim&quot;, for example &quot;gvim-5&quot;.<br>
<br>
You may also start up the GUI from within the terminal version by using one of<br>
these commands:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:gui&nbsp;<span class="Special">[++opt]</span>&nbsp;<span class="Special">[+cmd]</span>&nbsp;[-f|-b] [files...]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#:gu" name=":gu">:gu</a>&nbsp;<a class="Constant" href="gui_x11.html#:gui" name=":gui">:gui</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:gvim&nbsp;<span class="Special">[++opt]</span>&nbsp;<span class="Special">[+cmd]</span>&nbsp;[-f|-b] [files...]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#:gv" name=":gv">:gv</a>&nbsp;<a class="Constant" href="gui_x11.html#:gvim" name=":gvim">:gvim</a><br>
The &quot;-f&quot; option runs Vim in the foreground.<br>
The &quot;-b&quot; option runs Vim in the background (this is the default).<br>
Also see&nbsp;<a class="Identifier" href="editing.html#++opt">++opt</a>&nbsp;and&nbsp;<a class="Identifier" href="editing.html#+cmd">+cmd</a>.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-fork" name="gui-fork">gui-fork</a><br>
When the GUI is started, it does a fork() and exits the current process.<br>
When gvim was started from a shell this makes the shell accept further<br>
commands.&nbsp;&nbsp;If you don't want this (e.g. when using gvim for a mail program<br>
that waits for gvim to exit), start gvim with &quot;gvim -f&quot;, &quot;vim -gf&quot; or use<br>
&quot;:gui -f&quot;.&nbsp;&nbsp;Don't use &quot;vim -fg&quot;, because &quot;-fg&quot; specifies the foreground<br>
color.<br>
<br>
When using &quot;gvim -f&quot; and then &quot;:gui&quot;, Vim will run in the foreground.&nbsp;&nbsp;The<br>
&quot;-f&quot; argument will be remembered.&nbsp;&nbsp;To force running Vim in the background use<br>
&quot;:gui -b&quot;.<br>
<br>
&quot;gvim --nofork&quot; does the same as &quot;gvim -f&quot;.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#E851" name="E851">E851</a>&nbsp;<a class="Constant" href="gui_x11.html#E852" name="E852">E852</a><br>
When starting the GUI fails Vim will try to continue running in the terminal.<br>
<br>
If you want the GUI to run in the foreground always, include the 'f'<br>
flag in&nbsp;<a class="Type" href="options.html#'guioptions'">'guioptions'</a>.&nbsp;&nbsp;<a class="Identifier" href="starting.html#-f">-f</a>.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
2. GUI Resources&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-resources" name="gui-resources">gui-resources</a>&nbsp;<a class="Constant" href="gui_x11.html#.Xdefaults" name=".Xdefaults">.Xdefaults</a><br>
<br>
If using the Motif or Athena version of the GUI (not for the KDE, GTK+ or Win32<br>
version), a number of X resources are available.&nbsp;&nbsp;You should use Vim's class<br>
&quot;Vim&quot; when setting these.&nbsp;&nbsp;They are as follows:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="PreProc">Resource name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Meaning&nbsp;</span><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;reverseVideo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Boolean: should reverse video be used?<br>
&nbsp;&nbsp;&nbsp;&nbsp;background&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Color of background.<br>
&nbsp;&nbsp;&nbsp;&nbsp;foreground&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Color of normal text.<br>
&nbsp;&nbsp;&nbsp;&nbsp;scrollBackground&nbsp;&nbsp;&nbsp;&nbsp;Color of trough portion of scrollbars.<br>
&nbsp;&nbsp;&nbsp;&nbsp;scrollForeground&nbsp;&nbsp;&nbsp;&nbsp;Color of slider and arrow portions of scrollbars.<br>
&nbsp;&nbsp;&nbsp;&nbsp;menuBackground&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Color of menu backgrounds.<br>
&nbsp;&nbsp;&nbsp;&nbsp;menuForeground&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Color of menu foregrounds.<br>
&nbsp;&nbsp;&nbsp;&nbsp;tooltipForeground&nbsp;&nbsp; Color of tooltip and balloon foreground.<br>
&nbsp;&nbsp;&nbsp;&nbsp;tooltipBackground&nbsp;&nbsp; Color of tooltip and balloon background.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name of font used for normal text.<br>
&nbsp;&nbsp;&nbsp;&nbsp;boldFont&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name of font used for bold text.<br>
&nbsp;&nbsp;&nbsp;&nbsp;italicFont&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name of font used for italic text.<br>
&nbsp;&nbsp;&nbsp;&nbsp;boldItalicFont&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name of font used for bold, italic text.<br>
&nbsp;&nbsp;&nbsp;&nbsp;menuFont&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name of font used for the menus, used when compiled<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;without the&nbsp;<a class="Identifier" href="various.html#+xfontset">+xfontset</a>&nbsp;feature<br>
&nbsp;&nbsp;&nbsp;&nbsp;menuFontSet&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name of fontset used for the menus, used when compiled<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with the&nbsp;<a class="Identifier" href="various.html#+xfontset">+xfontset</a>&nbsp;feature<br>
&nbsp;&nbsp;&nbsp;&nbsp;tooltipFont&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name of the font used for the tooltip and balloons.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;When compiled with the&nbsp;<a class="Identifier" href="various.html#+xfontset">+xfontset</a>&nbsp;feature this is a<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fontset name.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;geometry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initial geometry to use for gvim's window (default<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is same size as terminal that started it).<br>
&nbsp;&nbsp;&nbsp;&nbsp;scrollbarWidth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Thickness of scrollbars.<br>
&nbsp;&nbsp;&nbsp;&nbsp;borderWidth&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thickness of border around text area.<br>
&nbsp;&nbsp;&nbsp;&nbsp;menuHeight&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Height of the menu bar (only for Athena).<br>
<br>
A special font for italic, bold, and italic-bold text will only be used if<br>
the user has specified one via a resource.&nbsp;&nbsp;No attempt is made to guess what<br>
fonts should be used for these based on the normal text font.<br>
<br>
<span class="Todo">Note</span>&nbsp;that the colors can also be set with the &quot;:highlight&quot; command, using the<br>
&quot;Normal&quot;, &quot;Menu&quot;, &quot;Tooltip&quot;, and &quot;Scrollbar&quot; groups.&nbsp;&nbsp;Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:highlight Menu guibg=lightblue<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:highlight Tooltip guibg=yellow<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:highlight Scrollbar guibg=lightblue guifg=blue<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:highlight Normal guibg=grey90</div>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#font-sizes" name="font-sizes">font-sizes</a><br>
<span class="Todo">Note</span>: All fonts (except for the menu and tooltip) must be of the same size!!!<br>
If you don't do this, text will disappear or mess up the display.&nbsp;&nbsp;Vim does<br>
not check the font sizes.&nbsp;&nbsp;It's the size in screen pixels that must be the<br>
same.&nbsp;&nbsp;<span class="Todo">Note</span>&nbsp;that some fonts that have the same point size don't have the same<br>
pixel size!&nbsp;&nbsp;Additionally, the positioning of the fonts must be the same<br>
(ascent and descent).&nbsp;&nbsp;You can check this with &quot;xlsfonts -l&nbsp;<span class="Special">{fontname}</span>&quot;.<br>
<br>
If any of these things are also set with Vim commands, e.g. with<br>
&quot;:set guifont=Screen15&quot;, then this will override the X resources (currently<br>
<a class="Type" href="options.html#'guifont'">'guifont'</a>&nbsp;is the only option that is supported).<br>
<br>
Here is an example of what you might put in your ~/.Xdefaults file:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim*useSchemes:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim*sgiMode:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;true<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim*useEnhancedFSB:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; true<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim.foreground:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Black<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim.background:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Wheat<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim*fontList:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 7x13</div>
<br>
The first three of these are standard resources on Silicon Graphics machines<br>
which make Motif applications look even better, highly recommended!<br>
<br>
The &quot;Vim*fontList&quot; is to set the menu font for Motif.&nbsp;&nbsp;Example:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim*menuBar*fontList:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-*-courier-medium-r-*-*-10-*-*-*-*-*-*-*</div>
With Athena:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim*menuBar*SmeBSB*font:&nbsp;&nbsp;&nbsp;&nbsp; -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim*menuBar*MenuButton*font: -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*</div>
<br>
<span class="Todo">NOTE</span>: A more portable, and indeed more correct, way to specify the menu font<br>
in either Motif or Athena is through the resource:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim.menuFont:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-*-courier-medium-r-*-*-10-*-*-*-*-*-*-*</div>
Or, when compiled with the&nbsp;<a class="Identifier" href="various.html#+xfontset">+xfontset</a>&nbsp;feature:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim.menuFontSet:&nbsp;&nbsp;&nbsp;&nbsp; -*-courier-medium-r-*-*-10-*-*-*-*-*-*-*</div>
<br>
Don't use &quot;Vim*geometry&quot; in the defaults.&nbsp;&nbsp;This will break the menus.&nbsp;&nbsp;Use<br>
&quot;Vim.geometry&quot; instead.<br>
<br>
If you get an error message &quot;Cannot allocate colormap entry for &quot;gray60&quot;,<br>
try adding this to your Vim resources (change the colors to your liking):<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim*scrollBackground:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Black<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vim*scrollForeground:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Blue</div>
<br>
The resources can also be set with arguments to Vim&#0058;<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="PreProc">argument&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;meaning</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-gui" name="-gui">-gui</a><br>
&nbsp;&nbsp; -display&nbsp;<span class="Special">{display}</span>&nbsp;&nbsp; Run vim on&nbsp;<span class="Special">{display}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-display" name="-display">-display</a><br>
&nbsp;&nbsp; -iconic&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Start vim iconified&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-iconic" name="-iconic">-iconic</a><br>
&nbsp;&nbsp; -background&nbsp;<span class="Special">{color}</span>&nbsp;&nbsp;Use&nbsp;<span class="Special">{color}</span>&nbsp;for the background&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-background" name="-background">-background</a><br>
&nbsp;&nbsp; -bg&nbsp;<span class="Special">{color}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-bg" name="-bg">-bg</a><br>
&nbsp;&nbsp; -foreground&nbsp;<span class="Special">{color}</span>&nbsp;&nbsp;Use&nbsp;<span class="Special">{color}</span>&nbsp;for normal text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-foreground" name="-foreground">-foreground</a><br>
&nbsp;&nbsp; -fg&nbsp;<span class="Special">{color}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-fg" name="-fg">-fg</a><br>
&nbsp;&nbsp; -ul&nbsp;<span class="Special">{color}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-ul" name="-ul">-ul</a><br>
&nbsp;&nbsp; -font&nbsp;<span class="Special">{font}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Use&nbsp;<span class="Special">{font}</span>&nbsp;for normal text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-font" name="-font">-font</a><br>
&nbsp;&nbsp; -fn&nbsp;<span class="Special">{font}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; idem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-fn" name="-fn">-fn</a><br>
&nbsp;&nbsp; -boldfont&nbsp;<span class="Special">{font}</span>&nbsp;&nbsp;&nbsp;&nbsp; Use&nbsp;<span class="Special">{font}</span>&nbsp;for bold text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-boldfont" name="-boldfont">-boldfont</a><br>
&nbsp;&nbsp; -italicfont&nbsp;<span class="Special">{font}</span>&nbsp;&nbsp; Use&nbsp;<span class="Special">{font}</span>&nbsp;for italic text&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-italicfont" name="-italicfont">-italicfont</a><br>
&nbsp;&nbsp; -menufont&nbsp;<span class="Special">{font}</span>&nbsp;&nbsp;&nbsp;&nbsp; Use&nbsp;<span class="Special">{font}</span>&nbsp;for menu items&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-menufont" name="-menufont">-menufont</a><br>
&nbsp;&nbsp; -menufontset&nbsp;<span class="Special">{fontset}</span>&nbsp;Use&nbsp;<span class="Special">{fontset}</span>&nbsp;for menu items&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-menufontset" name="-menufontset">-menufontset</a><br>
&nbsp;&nbsp; -mf&nbsp;<span class="Special">{font}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; idem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-mf" name="-mf">-mf</a><br>
&nbsp;&nbsp; -geometry&nbsp;<span class="Special">{geom}</span>&nbsp;&nbsp;&nbsp;&nbsp; Use&nbsp;<span class="Special">{geom}</span>&nbsp;for initial geometry&nbsp;<a class="Constant" href="gui_x11.html#-geometry" name="-geometry">-geometry</a><br>
&nbsp;&nbsp; -geom&nbsp;<span class="Special">{geom}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; idem, see&nbsp;<a class="Identifier" href="gui_x11.html#-geometry-example">-geometry-example</a>&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-geom" name="-geom">-geom</a><br>
&nbsp;&nbsp; -borderwidth&nbsp;<span class="Special">{width}</span>&nbsp;Use a border width of&nbsp;<span class="Special">{width}</span>&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-borderwidth" name="-borderwidth">-borderwidth</a><br>
&nbsp;&nbsp; -bw&nbsp;<span class="Special">{width}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-bw" name="-bw">-bw</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-scrollbarwidth" name="-scrollbarwidth">-scrollbarwidth</a><br>
&nbsp;&nbsp; -scrollbarwidth&nbsp;<span class="Special">{width}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use a scrollbar width of&nbsp;<span class="Special">{width}</span><br>
&nbsp;&nbsp; -sw&nbsp;<span class="Special">{width}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-sw" name="-sw">-sw</a><br>
&nbsp;&nbsp; -menuheight&nbsp;<span class="Special">{height}</span>&nbsp;Use a menu bar height of&nbsp;<span class="Special">{height}</span>&nbsp;<a class="Constant" href="gui_x11.html#-menuheight" name="-menuheight">-menuheight</a><br>
&nbsp;&nbsp; -mh&nbsp;<span class="Special">{height}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; idem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-mh" name="-mh">-mh</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Todo">NOTE</span>: On Motif the value is ignored, the menu height<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;is computed to fit the menus.<br>
&nbsp;&nbsp; -reverse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Use reverse video&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-reverse" name="-reverse">-reverse</a><br>
&nbsp;&nbsp; -rv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-rv" name="-rv">-rv</a><br>
&nbsp;&nbsp; +reverse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Don't use reverse video&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-+reverse" name="-+reverse">-+reverse</a><br>
&nbsp;&nbsp; +rv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;idem&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-+rv" name="-+rv">-+rv</a><br>
&nbsp;&nbsp; -xrm&nbsp;<span class="Special">{resource}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the specified resource&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-xrm" name="-xrm">-xrm</a><br>
<br>
<span class="Todo">Note</span>&nbsp;about reverse video: Vim checks that the result is actually a light text<br>
on a dark background.&nbsp;&nbsp;The reason is that some X11 versions swap the colors,<br>
and some don't.&nbsp;&nbsp;These two examples will both give yellow text on a blue<br>
background:<br>
&nbsp;&nbsp;&nbsp;&nbsp;gvim -fg Yellow -bg Blue -reverse<br>
&nbsp;&nbsp;&nbsp;&nbsp;gvim -bg Yellow -fg Blue -reverse<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#-geometry-example" name="-geometry-example">-geometry-example</a><br>
An example for the geometry argument:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gvim -geometry 80x63+8+100</div>
This creates a window with 80 columns and 63 lines at position 8 pixels from<br>
the left and 100 pixels from the top of the screen.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
3. Shell Commands&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-pty" name="gui-pty">gui-pty</a><br>
<br>
WARNING: Executing an external command from the GUI will not always work.<br>
&quot;normal&quot; commands like &quot;ls&quot;, &quot;grep&quot; and &quot;make&quot; mostly work fine.&nbsp;&nbsp;Commands<br>
that require an intelligent terminal like &quot;less&quot; and &quot;ispell&quot; won't work.<br>
Some may even hang and need to be killed from another terminal.&nbsp;&nbsp;So be<br>
careful!<br>
<br>
There are two ways to do the I/O with a shell command: Pipes and a pseudo-tty.<br>
The default is to use a pseudo-tty.&nbsp;&nbsp;This should work best on most systems.<br>
<br>
Unfortunately, the implementation of the pseudo-tty is different on every Unix<br>
system.&nbsp;&nbsp;And some systems require root permission.&nbsp;&nbsp;To avoid running into<br>
problems with a pseudo-tty when you least expect it, test it when not editing<br>
a file.&nbsp;&nbsp;Be prepared to &quot;kill&quot; the started command or Vim.&nbsp;&nbsp;Commands like<br>
&quot;:r !cat&quot; may hang!<br>
<br>
If using a pseudo-tty does not work for you, reset the&nbsp;<a class="Type" href="options.html#'guipty'">'guipty'</a>&nbsp;option:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:set noguipty</div>
<br>
Using a pipe should work on any Unix system, but there are disadvantages:<br>
- Some shell commands will notice that a pipe is being used and behave<br>
&nbsp;&nbsp;differently.&nbsp;&nbsp;E.g., &quot;:!ls&quot; will list the files in one column.<br>
- The &quot;:sh&quot; command won't show a prompt, although it will sort of work.<br>
- When using &quot;:make&quot; it's not possible to interrupt with a&nbsp;<span class="Special">CTRL-C</span>.<br>
<br>
Typeahead while the external command is running is often lost.&nbsp;&nbsp;This happens<br>
both with a pipe and a pseudo-tty.&nbsp;&nbsp;This is a known problem, but it seems it<br>
can't be fixed (or at least, it's very difficult).<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-pty-erase" name="gui-pty-erase">gui-pty-erase</a><br>
When your erase character is wrong for an external command, you should fix<br>
this in your &quot;~/.cshrc&quot; file, or whatever file your shell uses for<br>
initializations.&nbsp;&nbsp;For example, when you want to use backspace to delete<br>
characters, but hitting backspaces produces &quot;^H&quot; instead, try adding this to<br>
your &quot;~/.cshrc&quot;:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stty erase ^H</div>
The ^H is a real&nbsp;<span class="Special">CTRL-H</span>, type it as&nbsp;<span class="Special">CTRL-V</span>&nbsp;<span class="Special">CTRL-H</span>.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
4. Various&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11-various" name="gui-x11-various">gui-x11-various</a><br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11-printing" name="gui-x11-printing">gui-x11-printing</a><br>
The &quot;File/Print&quot; menu simply sends the current buffer to &quot;lpr&quot;.&nbsp;&nbsp;No options or<br>
whatever.&nbsp;&nbsp;If you want something else, you can define your own print command.<br>
For example:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;:10amenu File.Print :w !lpr -Php3<br>
&nbsp;&nbsp;:10vmenu File.Print :w !lpr -Php3</div>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#X11-icon" name="X11-icon">X11-icon</a><br>
Vim uses a black&amp;white icon by default when compiled with Motif or Athena.&nbsp;&nbsp;A<br>
colored Vim icon is included as $VIMRUNTIME/vim32x32.xpm.&nbsp;&nbsp;For GTK+, this is<br>
the builtin icon used.&nbsp;&nbsp;Unfortunately, how you should install it depends on<br>
your window manager.&nbsp;&nbsp;When you use this, remove the 'i' flag from<br>
<a class="Type" href="options.html#'guioptions'">'guioptions'</a>, to remove the black&amp;white icon:<br>
<div class="helpExample">&nbsp;&nbsp;:set guioptions-=i</div>
<br>
If you use one of the fvwm* family of window managers simply add this line to<br>
your .fvwm2rc configuration file:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;Style &quot;vim&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Icon vim32x32.xpm</div>
<br>
Make sure the icon file's location is consistent with the window manager's<br>
ImagePath statement.&nbsp;&nbsp;Either modify the ImagePath from within your .fvwm2rc or<br>
drop the icon into one the pre-defined directories:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;ImagePath /usr/X11R6/include/X11/pixmaps:/usr/X11R6/include/X11/bitmaps</div>
<br>
<span class="Todo">Note</span>: older versions of fvwm use &quot;IconPath&quot; instead of &quot;ImagePath&quot;.<br>
<br>
For CDE &quot;dtwm&quot; (a derivative of Motif) add this line in the .Xdefaults:<br>
<div class="helpExample">&nbsp;&nbsp; Dtwm*Vim*iconImage: /usr/local/share/vim/vim32x32.xpm</div>
<br>
For &quot;mwm&quot; (Motif window manager) the line would be:<br>
<div class="helpExample">&nbsp;&nbsp; Mwm*Vim*iconImage: /usr/local/share/vim/vim32x32.xpm</div>
<br>
<br>
<span class="PreProc">Mouse Pointers Available in X11</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#X11_mouse_shapes" name="X11_mouse_shapes">X11_mouse_shapes</a><br>
By using the&nbsp;<a class="Identifier" href="options.html#'mouseshape'">'mouseshape'</a>&nbsp;option, the mouse pointer can be automatically<br>
changed whenever Vim enters one of its various modes (e.g., Insert or<br>
Command).&nbsp;&nbsp;Currently, the available pointers are:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arrow&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; an arrow pointing northwest<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beam&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a I-like vertical bar<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;an arrow pointing up and down<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;busy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a wristwatch<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blank&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; an invisible pointer<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;crosshair&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a thin &quot;+&quot; sign<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hand1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a dark hand pointing northeast<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hand2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a light hand pointing northwest<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pencil&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a pencil pointing southeast<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;question&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;question_arrow<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;right_arrow&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; an arrow pointing northeast<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;up_arrow&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;an arrow pointing upwards<br>
<br>
Additionally, any of the mouse pointers that are built into X11 may be<br>
used by specifying an integer from the X11/cursorfont.h include file.<br>
<br>
If a name is used that exists on other systems, but not in X11, the default<br>
&quot;arrow&quot; pointer is used.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
5. GTK version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-gtk" name="gui-gtk">gui-gtk</a>&nbsp;<a class="Constant" href="gui_x11.html#GTK+" name="GTK+">GTK+</a>&nbsp;<a class="Constant" href="gui_x11.html#GTK" name="GTK">GTK</a>&nbsp;<a class="Constant" href="gui_x11.html#GTK3" name="GTK3">GTK3</a><br>
<br>
The GTK version of the GUI works a little bit different.<br>
<br>
GTK does _not_ use the traditional X resource settings.&nbsp;&nbsp;Thus items in your<br>
~/.Xdefaults or app-defaults files are not used.<br>
Many of the traditional X command line arguments are not supported.&nbsp;&nbsp;(e.g.,<br>
stuff like -bg, -fg, etc).&nbsp;&nbsp;The ones that are supported are:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="PreProc">command line argument&nbsp;&nbsp; resource name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; meaning</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;-fn&nbsp;&nbsp;or&nbsp;&nbsp;-font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.font&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; font name for the text<br>
&nbsp;&nbsp;&nbsp;&nbsp;-geom&nbsp;&nbsp;or&nbsp;&nbsp;-geometry&nbsp;&nbsp;&nbsp;&nbsp;.geometry&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; size of the gvim window<br>
&nbsp;&nbsp;&nbsp;&nbsp;-rv&nbsp;&nbsp;or&nbsp;&nbsp;-reverse&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *reverseVideo&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; white text on black background<br>
&nbsp;&nbsp;&nbsp;&nbsp;-display&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;display to be used<br>
&nbsp;&nbsp;&nbsp;&nbsp;-fg -foreground&nbsp;<span class="Special">{color}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; foreground color<br>
&nbsp;&nbsp;&nbsp;&nbsp;-bg -background&nbsp;<span class="Special">{color}</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; background color<br>
<br>
To set the font, see&nbsp;<a class="Identifier" href="options.html#'guifont'">'guifont'</a>.&nbsp;&nbsp;For GTK, there's also a menu option that<br>
does this.<br>
<br>
Additionally, there are these command line arguments, which are handled by GTK<br>
internally.&nbsp;&nbsp;Look in the GTK documentation for how they are used:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--sync<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--gdk-debug<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--gdk-no-debug<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--no-xshm&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (not in GTK+ 2)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--xim-preedit&nbsp;&nbsp; (not in GTK+ 2)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--xim-status&nbsp;&nbsp;&nbsp;&nbsp;(not in GTK+ 2)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--gtk-debug<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--gtk-no-debug<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--g-fatal-warnings<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--gtk-module<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--display&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (GTK+ counterpart of -display; works the same way.)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--screen&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(The screen number; for GTK+ 2.2 multihead support.)<br>
<br>
These arguments are ignored when the&nbsp;<a class="Identifier" href="various.html#+netbeans_intg">+netbeans_intg</a>&nbsp;feature is used:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-xrm<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-mf<br>
<br>
As for colors, Vim's color settings (for syntax highlighting) is still<br>
done the traditional Vim way.&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="syntax.html#:highlight">:highlight</a>&nbsp;for more help.<br>
<br>
If you want to set the colors of remaining gui components (e.g., the<br>
menubar, scrollbar, whatever), those are GTK specific settings and you<br>
need to set those up in some sort of gtkrc file.&nbsp;&nbsp;You'll have to refer<br>
to the GTK documentation, however little there is, on how to do this.<br>
See&nbsp;<span class="Constant"><a href="http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html">http://developer.gnome.org/doc/API/2.0/gtk/gtk-Resource-Files.html</a></span><br>
for more information.<br>
<br>
<br>
<span class="PreProc">Tooltip Colors</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gtk-tooltip-colors" name="gtk-tooltip-colors">gtk-tooltip-colors</a><br>
Example, which sets the tooltip colors to black on light-yellow:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;style &quot;tooltips&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bg[NORMAL] = &quot;#ffffcc&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fg[NORMAL] = &quot;#000000&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;widget &quot;gtk-tooltips*&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;style &quot;tooltips&quot;</div>
<br>
Write this in the file ~/.gtkrc and it will be used by GTK+.&nbsp;&nbsp;For GTK+ 2<br>
you might have to use the file ~/.gtkrc-2.0 instead, depending on your<br>
distribution.<br>
<br>
For GTK+ 3, an effect similar to the above can be obtained by adding the<br>
following snippet of CSS code to $XDG_HOME_DIR/gtk-3.0/gtk.css (usually,<br>
$HOME/.config/gtk-3.0/gtk.css):<br>
<br>
For GTK+ 3 &lt; 3.20:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.tooltip {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;background-color: #ffffcc;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color: #000000;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>
<br>
For GTK+ 3 &gt;= 3.20:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tooltip {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;background-color: #ffffcc;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;text-shadow: none;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tooltip label {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color: #2e3436;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>
<br>
<br>
<span class="PreProc">A Quick Look at GTK+ CSS</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gtk-css" name="gtk-css">gtk-css</a><br>
The contents of this subsection apply to GTK+ 3.20 or later which provides<br>
stable support for GTK+ CSS:<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Constant"><a href="https://developer.gnome.org/gtk3/stable/theming.html">https://developer.gnome.org/gtk3/stable/theming.html</a></span><br>
<br>
GTK+ uses CSS for styling and layout of widgets.&nbsp;&nbsp;In this subsection, we'll<br>
have a quick look at GTK+ CSS through simple, illustrative examples.<br>
<br>
<span class="PreProc">Example 1.&nbsp;&nbsp;Empty Space Adjustment</span><br>
<br>
By default, the toolbar and the tabline of the GTK+ 3 GUI are somewhat larger<br>
than those of the GTK+ 2 GUI.&nbsp;&nbsp;Some people may want to make them look similar<br>
to the GTK+ 2 GUI in size.<br>
<br>
To do that, we'll try reducing empty space around icons and labels that looks<br>
apparently superfluous.<br>
<br>
Add the following lines to $XDG_HOME_DIR/gtk-3.0/gtk.css (usually,<br>
$HOME/.config/gtk-3.0/gtk.css):<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;toolbar button {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-top: -2px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-right: 0px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-bottom: -2px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-left: 0px;</div>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding-top: 0px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding-right: 0px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding-bottom: 0px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding-left: 0px<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;notebook tab {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-top: -1px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-right: 3px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-bottom: -1px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin-left: 3px;</div>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding-top: 0px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding-right: 0px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding-bottom: 0px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding-left: 0px<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>
<br>
Since it's a CSS, they can be rewritten using shorthand:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;toolbar button {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin: -2px 0px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding: 0px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;notebook tab {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;margin: -1px 3px;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;padding: 0px<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>
<br>
<span class="Todo">Note</span>: You might want to use&nbsp;<a class="Type" href="options.html#'toolbariconsize'">'toolbariconsize'</a>&nbsp;to adjust the icon size, too.<br>
<br>
<span class="Todo">Note</span>: Depending on the icon theme and/or the font in use, some extra tweaks<br>
may be needed for a satisfactory result.<br>
<br>
<span class="Todo">Note</span>: In addition to margin and padding, you can use border.&nbsp;&nbsp;For details,<br>
refer to the box model of CSS, e.g.,<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="Constant"><a href="https://www.w3schools.com/css/css_boxmodel.asp">https://www.w3schools.com/css/css_boxmodel.asp</a></span><br>
<br>
<span class="PreProc">Example 2.&nbsp;&nbsp;More Than Just Colors</span><br>
<br>
GTK+ CSS supports gradients as well:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tooltip {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;background-image: -gtk-gradient(linear,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 0, 0 1,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color-stop(0, #344752),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color-stop(0.5, #546772),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color-stop(1, #243742));<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tooltip label {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;color: #f3f3f3;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</div>
<br>
Gradients can be used to make a GUI element visually distinguishable from<br>
others without relying on high contrast. Accordingly, effective use of them is<br>
a useful technique to give a theme a sense of unity in color and luminance.<br>
<br>
<span class="Todo">Note</span>: Theming can be difficult since it must make every application look<br>
equally good; making a single application more charming often gets others<br>
unexpectedly less attractive or even deteriorates their usability.&nbsp;&nbsp;Keep this<br>
in mind always when you try improving a theme.<br>
<br>
<br>
<span class="PreProc">Using Vim as a GTK+ plugin</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-gtk-socketid" name="gui-gtk-socketid">gui-gtk-socketid</a><br>
When the GTK+ version of Vim starts up normally, it creates its own top level<br>
window (technically, a 'GtkWindow').&nbsp;&nbsp;GTK+ provides an embedding facility with<br>
its GtkSocket and GtkPlug widgets.&nbsp;&nbsp;If one GTK+ application creates a<br>
GtkSocket widget in one of its windows, an entirely different GTK+ application<br>
may embed itself into the first application by creating a top-level GtkPlug<br>
widget using the socket's ID.<br>
<br>
If you pass Vim the command-line option '--socketid' with a decimal or<br>
hexadecimal value, Vim will create a GtkPlug widget using that value instead<br>
of the normal GtkWindow.&nbsp;&nbsp;This enables Vim to act as a GTK+ plugin.<br>
<br>
This really is a programmer's interface, and is of no use without a supporting<br>
application to spawn the Vim correctly.&nbsp;&nbsp;For more details on GTK+ sockets, see<br>
<span class="Constant"><a href="http://www.gtk.org/api/">http://www.gtk.org/api/</a></span><br>
<br>
<span class="Todo">Note</span>&nbsp;that this feature requires the latest GTK version.&nbsp;&nbsp;GTK 1.2.10 still has<br>
a small problem.&nbsp;&nbsp;The socket feature has not yet been tested with GTK+ 2 --<br>
feel free to volunteer.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
6. GNOME version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-gnome" name="gui-gnome">gui-gnome</a>&nbsp;<a class="Constant" href="gui_x11.html#Gnome" name="Gnome">Gnome</a>&nbsp;<a class="Constant" href="gui_x11.html#GNOME" name="GNOME">GNOME</a><br>
<br>
The GNOME GUI works just like the GTK+ version.&nbsp;&nbsp;See&nbsp;<a class="Identifier" href="gui_x11.html#GTK+">GTK+</a>&nbsp;above for how it<br>
works.&nbsp;&nbsp;It looks a bit different though, and implements one important feature<br>
that's not available in the plain GTK+ GUI:&nbsp;&nbsp;Interaction with the session<br>
manager.&nbsp;<a class="Identifier" href="gui_x11.html#gui-gnome-session">gui-gnome-session</a><br>
<br>
These are the different looks:<br>
- Uses GNOME dialogs (GNOME 1 only).&nbsp;&nbsp;The GNOME 2 GUI uses the same nice<br>
&nbsp;&nbsp;dialogs as the GTK+ 2 version.<br>
- Uses the GNOME dock, so that the toolbar and menubar can be moved to<br>
&nbsp;&nbsp;different locations other than the top (e.g., the toolbar can be placed on<br>
&nbsp;&nbsp;the left, right, top, or bottom).&nbsp;&nbsp;The placement of the menubar and<br>
&nbsp;&nbsp;toolbar is only saved in the GNOME 2 version.<br>
- That means the menubar and toolbar handles are back!&nbsp;&nbsp;Yeah!&nbsp;&nbsp;And the<br>
&nbsp;&nbsp;resizing grid still works too.<br>
<br>
GNOME is compiled with if it was found by configure and the<br>
--enable-gnome-check argument was used.<br>
<br>
<span class="Todo">Note</span>: Avoid use of --enable-gnome-check with GTK+ 3 GUI build.&nbsp;&nbsp;The<br>
functionality mentioned above is consolidated in GTK+ 3.<br>
<br>
<br>
<span class="PreProc">GNOME session support</span><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-gnome-session" name="gui-gnome-session">gui-gnome-session</a>&nbsp;<a class="Constant" href="gui_x11.html#gnome-session" name="gnome-session">gnome-session</a><br>
On logout, Vim shows the well-known exit confirmation dialog if any buffers<br>
are modified.&nbsp;&nbsp;Clicking&nbsp;<span class="Special">[Cancel]</span>&nbsp;will stop the logout process.&nbsp;&nbsp;Otherwise the<br>
current session is stored to disk by using the&nbsp;<a class="Identifier" href="starting.html#:mksession">:mksession</a>&nbsp;command, and<br>
restored the next time you log in.<br>
<br>
The GNOME session support should also work with the KDE session manager.<br>
If you are experiencing any problems please report them as bugs.<br>
<br>
<span class="Todo">Note</span>: The automatic session save works entirely transparent, in order to<br>
avoid conflicts with your own session files, scripts and autocommands.&nbsp;&nbsp;That<br>
means in detail:<br>
- The session file is stored to a separate directory (usually $HOME/.gnome2).<br>
-&nbsp;<a class="Type" href="options.html#'sessionoptions'">'sessionoptions'</a>&nbsp;is ignored, and a hardcoded set of appropriate flags is<br>
&nbsp;&nbsp;used instead:<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;blank,curdir,folds,globals,help,options,tabpages,winsize</div>
- The internal variable&nbsp;<a class="Identifier" href="eval.html#v:this_session">v:this_session</a>&nbsp;is not changed when storing the<br>
&nbsp;&nbsp;session.&nbsp;&nbsp;Also, it is restored to its old value when logging in again.<br>
<br>
The position and size of the GUI window is not saved by Vim since doing so<br>
is the window manager's job.&nbsp;&nbsp;But if compiled with GTK+ 2 support, Vim helps<br>
the WM to identify the window by restoring the window role (using the&nbsp;<a class="Identifier" href="starting.html#--role">--role</a><br>
command line argument).<br>
<br>
<span class="PreProc">==============================================================================</span><br>
7. KDE version&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-kde" name="gui-kde">gui-kde</a>&nbsp;<a class="Constant" href="gui_x11.html#kde" name="kde">kde</a>&nbsp;<a class="Constant" href="gui_x11.html#KDE" name="KDE">KDE</a>&nbsp;<a class="Constant" href="gui_x11.html#KVim" name="KVim">KVim</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11-kde" name="gui-x11-kde">gui-x11-kde</a><br>
There is no KDE version of Vim.&nbsp;&nbsp;There has been some work on a port using the<br>
Qt toolkit, but it never worked properly and it has been abandoned.&nbsp;&nbsp;Work<br>
continues on Yzis:&nbsp;<span class="Constant"><a href="https://github.com/chrizel/Yzis">https://github.com/chrizel/Yzis</a></span>.<br>
<br>
<span class="PreProc">==============================================================================</span><br>
8. Compiling&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11-compiling" name="gui-x11-compiling">gui-x11-compiling</a><br>
<br>
If using X11, Vim's configure will by default first try to find the necessary<br>
GTK+ files on your system.&nbsp;&nbsp;When both GTK+ 2 and GTK+ 3 are available, GTK+ 2<br>
will be chosen unless --enable-gui=gtk3 is passed explicitly to configure.<br>
<br>
If the GTK+ files cannot be found, then the Motif files will be searched for.<br>
Finally, if this fails, the Athena files will be searched for.&nbsp;&nbsp;If all three<br>
fail, the GUI will be disabled.<br>
<br>
For GTK+, Vim's configuration process uses pkg-config(1) to check if the<br>
GTK+ required for a specified build is properly installed and usable.<br>
Accordingly, it is a good idea to make sure before running configure that<br>
your system has a working pkg-config together with the .pc file of the<br>
required GTK+.&nbsp;&nbsp;For that, say, run the following on the command line to see if<br>
your pkg-config works with your GTK+ 2:<br>
<br>
<div class="helpExample">&nbsp;&nbsp;&nbsp;&nbsp;$ pkg-config --modversion gtk+-2.0</div>
<br>
Replace gtk+-2.0 with gtk+-3.0 for GTK+ 3. If you get the correct version<br>
number of your GTK+, you can proceed; if not, you probably need to do some<br>
system administration chores to set up pkg-config and GTK+ correctly.<br>
<br>
The GTK+ 2 GUI is built by default.&nbsp;&nbsp;Therefore, you usually don't need to pass<br>
any options such as --enable-gui=gtk2 to configure and build that.<br>
<br>
Optionally, the GTK+ 2 GUI can consolidate the GNOME 2 support.&nbsp;&nbsp;This support<br>
is enabled by passing --enable-gnome-check to configure.<br>
<br>
If you want to build the GTK+ 3 GUI, you have to pass --enable-gui=gtk3<br>
explicitly to configure, and avoid passing --enable-gnome-check to that, as<br>
the functionality of the GNOME 2 support has already been consolidated in<br>
GTK+ 3.<br>
<br>
Otherwise, if you are using Motif or Athena, when you have the Motif or Athena<br>
files in a directory where configure doesn't look, edit the Makefile to enter<br>
the names of the directories.&nbsp;&nbsp;Search for &quot;GUI_INC_LOC&quot; for an example to set<br>
the Motif directories, &quot;CONF_OPT_X&quot; for Athena.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11-gtk" name="gui-x11-gtk">gui-x11-gtk</a><br>
Currently, Vim supports both GTK+ 2 and GTK+ 3.<br>
<br>
The GTK+ 2 GUI requires GTK+ 2.2 or later.<br>
<br>
Although the GTK+ 3 GUI is written in such a way that the source code can be<br>
compiled against all versions of the 3.x series, we recommend GTK+ 3.10 or<br>
later because of its substantial implementation changes in redraw done at<br>
that version.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11-motif" name="gui-x11-motif">gui-x11-motif</a><br>
For Motif, you need at least Motif version 1.2 and/or X11R5.&nbsp;&nbsp;Motif 2.0 and<br>
X11R6 are OK.&nbsp;&nbsp;Motif 1.1 and X11R4 might work, no guarantee (there may be a<br>
few problems, but you might make it compile and run with a bit of work, please<br>
send me the patches if you do).&nbsp;&nbsp;The newest releases of LessTif have been<br>
reported to work fine too.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11-athena" name="gui-x11-athena">gui-x11-athena</a><br>
The Athena version uses the Xaw widget set by default.&nbsp;&nbsp;If you have the 3D<br>
version, you might want to link with Xaw3d instead.&nbsp;&nbsp;This will make the<br>
menus look a bit better.&nbsp;&nbsp;Edit the Makefile and look for &quot;XAW_LIB&quot;.&nbsp;&nbsp;The<br>
scrollbars will remain the same, because Vim has its own, which are already<br>
3D (in fact, they look more like Motif).<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11-neXtaw" name="gui-x11-neXtaw">gui-x11-neXtaw</a><br>
The neXtaw version is mostly like Athena, but uses different widgets.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#gui-x11-misc" name="gui-x11-misc">gui-x11-misc</a><br>
In general, do not try to mix files from different GTK+, Motif, Athena and X11<br>
versions.&nbsp;&nbsp;This will cause problems.&nbsp;&nbsp;For example, using header files for<br>
X11R5 with a library for X11R6 probably doesn't work (although the linking<br>
won't give an error message, Vim will crash later).<br>
<br>
<span class="PreProc">==============================================================================</span><br>
9. X11 selection mechanism&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#x11-selection" name="x11-selection">x11-selection</a><br>
<br>
If using X11, in either the GUI or an xterm with an X11-aware Vim, then Vim<br>
provides varied access to the X11 selection and clipboard.&nbsp;&nbsp;These are accessed<br>
by using the two selection registers &quot;* and &quot;+.<br>
<br>
X11 provides two basic types of global store, selections and cut-buffers,<br>
which differ in one important aspect: selections are &quot;owned&quot; by an<br>
application, and disappear when that application (e.g., Vim) exits, thus<br>
losing the data, whereas cut-buffers, are stored within the X-server itself<br>
and remain until written over or the X-server exits (e.g., upon logging out).<br>
<br>
The contents of selections are held by the originating application (e.g., upon<br>
a copy), and only passed on to another application when that other application<br>
asks for them (e.g., upon a paste).<br>
<br>
The contents of cut-buffers are immediately written to, and are then<br>
accessible directly from the X-server, without contacting the originating<br>
application.<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#quoteplus" name="quoteplus">quoteplus</a>&nbsp;<a class="Constant" href="gui_x11.html#quote+" name="quote+">quote+</a><br>
There are three documented X selections: PRIMARY (which is expected to<br>
represent the current visual selection - as in Vim's Visual mode), SECONDARY<br>
(which is ill-defined) and CLIPBOARD (which is expected to be used for<br>
cut, copy and paste operations).<br>
<br>
Of these three, Vim uses PRIMARY when reading and writing the &quot;* register<br>
(hence when the X11 selections are available, Vim sets a default value for<br>
<a class="Identifier" href="options.html#'clipboard'">'clipboard'</a>&nbsp;of &quot;autoselect&quot;), and CLIPBOARD when reading and writing the &quot;+<br>
register.&nbsp;&nbsp;Vim does not access the SECONDARY selection.<br>
<br>
Examples: (assuming the default option values)<br>
- Select a URL in Visual mode in Vim.&nbsp;&nbsp;Go to your browser and click the<br>
&nbsp;&nbsp;middle mouse button in the URL text field.&nbsp;&nbsp;The selected text will be<br>
&nbsp;&nbsp;inserted (hopefully!).&nbsp;&nbsp;<span class="Todo">Note</span>: in Firefox you can set the<br>
&nbsp;&nbsp;middlemouse.contentLoadURL preference to true in about:config, then the<br>
&nbsp;&nbsp;selected URL will be used when pressing middle mouse button in most places<br>
&nbsp;&nbsp;in the window.<br>
- Select some text in your browser by dragging with the mouse.&nbsp;&nbsp;Go to Vim and<br>
&nbsp;&nbsp;press the middle mouse button: The selected text is inserted.<br>
- Select some text in Vim and do &quot;+y.&nbsp;&nbsp;Go to your browser, select some text in<br>
&nbsp;&nbsp;a textfield by dragging with the mouse.&nbsp;&nbsp;Now use the right mouse button and<br>
&nbsp;&nbsp;select &quot;Paste&quot; from the popup menu.&nbsp;&nbsp;The selected text is overwritten by the<br>
&nbsp;&nbsp;text from Vim.<br>
<span class="Todo">Note</span>&nbsp;that the text in the &quot;+ register remains available when making a Visual<br>
selection, which makes other text available in the &quot;* register.&nbsp;&nbsp;That allows<br>
overwriting selected text.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="Constant" href="gui_x11.html#x11-cut-buffer" name="x11-cut-buffer">x11-cut-buffer</a><br>
There are, by default, 8 cut-buffers: CUT_BUFFER0 to CUT_BUFFER7.&nbsp;&nbsp;Vim only<br>
uses CUT_BUFFER0, which is the one that xterm uses by default.<br>
<br>
Whenever Vim is about to become unavailable (either via exiting or becoming<br>
suspended), and thus unable to respond to another application's selection<br>
request, it writes the contents of any owned selection to CUT_BUFFER0.&nbsp;&nbsp;If the<br>
&quot;+ CLIPBOARD selection is owned by Vim, then this is written in preference,<br>
otherwise if the &quot;* PRIMARY selection is owned by Vim, then that is written.<br>
<br>
Similarly, when Vim tries to paste from &quot;* or &quot;+ (either explicitly, or, in<br>
the case of the &quot;* register, when the middle mouse button is clicked), if the<br>
requested X selection is empty or unavailable, Vim reverts to reading the<br>
current value of the CUT_BUFFER0.<br>
<br>
<span class="Todo">Note</span>&nbsp;that when text is copied to CUT_BUFFER0 in this way, the type of<br>
selection (character, line or block) is always lost, even if it is a Vim which<br>
later pastes it.<br>
<br>
Xterm, by default, always writes visible selections to both PRIMARY and<br>
CUT_BUFFER0.&nbsp;&nbsp;When it pastes, it uses PRIMARY if this is available, or else<br>
falls back upon CUT_BUFFER0.&nbsp;&nbsp;For this reason, when cutting and pasting<br>
between Vim and an xterm, you should use the &quot;* register.&nbsp;&nbsp;Xterm doesn't use<br>
CLIPBOARD, thus the &quot;+ doesn't work with xterm.<br>
<br>
Most newer applications will provide their current selection via PRIMARY (&quot;*)<br>
and use CLIPBOARD (&quot;+) for cut/copy/paste operations.&nbsp;&nbsp;You thus have access to<br>
both by choosing to use either of the &quot;* or &quot;+ registers.<br>
<br>
<br>
&nbsp;vim:tw=78:sw=4:ts=8:ft=help:norl:<br>
</div>

</article>

<footer>
<a href="#top">Return to the top</a> - <a href="index.html">Return to main</a>
<span class="EnglishJapaneseLink">
  <span class="CurrentLanguage">English</span>
</span>
<br />
<div style="text-align:right;">
Hosted by <a href="https://github.com/vim-jp/vimdoc-en">vimdoc-en project</a><br />
If you met any problem, please report it to <a href="https://github.com/vim-jp/vimdoc-en/issues">issue</a>.<br />
</div>
</footer>

<!--<script src="js/check-referrer.js" type="text/javascript"></script>-->

</body>
</html>
<!-- vim:set ts=8 sts=2 sw=2 tw=0 et: -->
